<template>
	<view>
		<!-- 顶部用户信息卡 -->
		<UserInfoCardVue></UserInfoCardVue>
		<!-- Tab栏 -->
		<Tabs :activeTab="activeTab" @change-tab="changeTab" />
		<view>
			<view class="queue-query-page">
				<!-- 就诊排队卡片 -->
				<Treatment :treatment-queue-info=treatmentQueueInfo v-if="activeTab === 'treatment'" />

				<!-- 取药排队卡片 -->
				<Medicine :medicine-queue-info=medicineQueueInfo v-if="activeTab === 'medicine'" />

				<!-- 检查排队卡片 -->
				<Examine :examine-queue-info=examineQueueInfo v-if="activeTab === 'examine'" />

				<!-- 检查排队卡片 -->
				<Inspection :inspection-queue-info=inspectionQueueInfo v-if="activeTab === 'inspection'" />
			</view>
		</view>
	</view>
</template>

<script>
	import Tabs from './components/tabs.vue';
	import Treatment from './components/Queue/treatment.vue';
	import Medicine from './components/Queue/medicine.vue';
	import Examine from './components/Queue/examine.vue';
	import Inspection from './components/Queue/inspection.vue';
	import UserInfoCardVue from '../../../components/UserInfo/UserInfoCard.vue';
	import {
		mapGetters
	} from 'vuex'
	export default {
		components: {
			UserInfoCardVue,
			Tabs,
			Treatment,
			Medicine,
			Examine,
			Inspection
		},
		computed: {
			...mapGetters(['userInfo', "hostApi"]),
		},
		data() {
			return {
				activeTab: 'treatment',
				treatmentQueueInfo: [{
					department: '小儿外科',
					waitingNum: 18,
					updateTime: '10:02:38',
					currentNum: 14,
					myNum: 32,
					doctor: '肖友明（副主任医师）',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊三楼B区外科诊区305',
					time: '2024-09-12  （周一） 10:00~10:30',
				}, ],
				medicineQueueInfo: [{
					department: '小儿外科',
					waitingNum: 18,
					updateTime: '10:02:38',
					currentNum: 14,
					myNum: 32,
					doctor: '肖友明（副主任医师）',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊辅楼一楼中心药房',
					window: '8号窗口',
				}, ],
				examineQueueInfo: [{
					department: '小儿外科',
					updateTime: '10:02:38',
					currentNum: 30,
					myNum: 32,
					project: '颅脑核磁共振成像（MRI）',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊三楼B区外科诊区305',
					room: '2检查室',
					time: '2024-09-12  （周一） 10:00~10:30',
				}, ],
				inspectionQueueInfo: [{
					department: '小儿外科',
					updateTime: '10:02:38',
					currentNum: 30,
					myNum: 32,
					project: '血常规',
					hospital: '雅安市人民医院大兴院区',
					location: '门诊三楼B区外科诊区305',
					room: '2检查室',
					time: '2024-09-12  （周一） 10:00~10:30',
				}, ]
			};
		},
		mounted() {
			this.init()
		},
		methods: {
			init() {
			},
			changeTab(tab) {
				this.activeTab = tab;
			},
		},
	};
</script>

<style lang="scss" scoped>
	.queue-query-page {
		background: linear-gradient(#e0f3ff 0%, #fff 30%);
		min-height: 100vh;
		padding: 16rpx;
	}
</style>